Skip to content

Add API key migration wizard support#3046

Open
premtsd-code wants to merge 1 commit into
feat-platform-db-accessfrom
add-api-key-migration
Open

Add API key migration wizard support#3046
premtsd-code wants to merge 1 commit into
feat-platform-db-accessfrom
add-api-key-migration

Conversation

@premtsd-code
Copy link
Copy Markdown
Contributor

Summary

Stacks on #3043. Adds api-key as its own top-level resource group in the migration wizard, parallel to platforms.

Backend uses the kebab-case 'api-key' resource id (matches Resource::TYPE_API_KEY in utopia-php/migration). The form field name apiKeys stays camelCase as it's a local property.

Cross-repo

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 14, 2026

Greptile Summary

This PR extends the migration wizard's integrations resource group to support API keys alongside platforms, wiring up the 'api-key' backend resource type through the store, form-to-resource mappings, and the report UI.

  • migration.ts: Adds ApiKey: 'api-key' to MigrationResources, an apiKeys sub-field under initialFormData.integrations, the friendly label entry, and the Appwrite provider resource list; updates both migrationFormToResources and resourcesToMigrationForm to handle the new field.
  • resource-form.svelte: Expands the shouldRenderGroup('integrations') check to also test for ApiKey availability; getReportKey is unchanged so the badge still reflects only the platform count.
  • importReport.svelte: Adds apiKeys label and description strings to the two display maps consumed by the accordion component.

Confidence Score: 5/5

Safe to merge; changes are additive and tightly scoped to the integrations resource group with no impact on other migration paths.

All three files receive small, targeted additions that follow the existing patterns. The round-trip between migrationFormToResources and resourcesToMigrationForm is correct for the one exercised code path (selectAll with a full provider resource list). The only gaps are a display-only badge count that misses API keys and a theoretical drift in resourcesToMigrationForm that cannot be triggered through the current UI.

No files require special attention for merging.

Important Files Changed

Filename Overview
src/lib/stores/migration.ts Adds 'api-key' resource type, ApiKey to MigrationResources/ResourcesFriendly/providerResources, and apiKeys sub-field under integrations; round-trip symmetry between migrationFormToResources and resourcesToMigrationForm is correct for current usage but has a theoretical one-way drift when ApiKey is present without Platform.
src/routes/(console)/(migration-wizard)/resource-form.svelte shouldRenderGroup for integrations correctly checks both Platform and ApiKey, but getReportKey still maps integrations to 'platform' only, so the accordion badge won't reflect API key counts.
src/routes/(console)/project-[region]-[project]/settings/migrations/(import)/importReport.svelte Adds apiKeys label and description entries to labelMap and descriptionMap for the integrations group; changes are straightforward and consistent with existing patterns.

Reviews (2): Last reviewed commit: "Add API key migration wizard support" | Re-trigger Greptile

Adds api-key as a child toggle under the existing integrations group,
matching the parent-child pattern used by users/teams, databases/rows,
and messaging/messages. The backend uses the kebab-case 'api-key'
resource id; the form field stays camelCase as a local property.
@premtsd-code premtsd-code force-pushed the add-api-key-migration branch from f26ca9f to 1116c57 Compare May 14, 2026 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant